$(function () {
    $('.carousel').slick({
        slidesToShow: 1,
        slidesToScroll: 1,
        dots: true,
        fade:true,
        responsive : [
            {
                breakpoint :1000,
                settings : {
                    fade:false,
                }
            }
        ],
    });
    const $window = $(window);
    const $carousel = $('.carousel-item');
//初始化设定高度
    setSize();
    $window.resize(function () {
        //二次确保窗口动态
        if ($window.width() >1000){
            let windowHeight = $window.height();
            $carousel.height(windowHeight);
        }else{
            $carousel.height(400);
        }
    });

    function setSize() {
        if ($window.width() >1000){
            let windowHeight = $window.height();
            $carousel.height(windowHeight);
        }else{
            $carousel.height(550);
        }
    }
});

